From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AVAILABLE is continuously generated where the available data is 0 but when I attempt a read it blocks, I am confident that no data is available on the port. Do you recall if these issues appeared in the past? Thanks, Craig On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > I don't want to be rude but is RXTX 2.2 still being actively developed? I >> do >> not have the ability to grab the source at work and aside from checking >> the >> dates on some wiki edits I have not seen any "news". >> >> > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time from > those using it. > > The parallel port users have fairly simple needs and are not itching to add > more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 26 13:31:13 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 26 Oct 2011 15:31:13 -0400 Subject: [Rxtx] rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Message-ID: Hello all, This was reported on Debian along with this patch, I wanted to share it here rxtx fails to read any gnu.io.rxtx.properties when "java.ext.dirs" system property contains more than one directory Patch to fix it is below. It hasn't been tested with what happens if you have multiple gnu.io.rxtx.properties files http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=rxtx-diff.patch;att=1;bug=646069 If you reply, please keep 646069 at bugs.debian.org in the CC:. Cheers, Scott From ddevecchio at celestron.com Wed Oct 26 13:36:34 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Wed, 26 Oct 2011 12:36:34 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> I was able to use it for a year without difficulty and I was running 2.1.7 or something like that. I am now testing out PureJavaComm. I would like to help make this more accessible and "less scary" for someone trying to make their first RXTX/PureJava application. It might be nice to have a step by step guide for making a simpleReadWrite for each of the major IDE's. I would want to include all the steps from how to add the .jar file to your project and how to add the appropriate dll's (or more jar files for PureJavaComm) to your distribution. If I created such a guide, where I could I put it? ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of jfh at greenhousepc.com Sent: Wednesday, October 26, 2011 11:41 AM To: rxtx at qbang.org Subject: Re: [Rxtx] RXTX Development The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. That's a gross understatement. Most of the RXTX users I know have their own version because there are so many bugs. -- Julie Haugh Senior Design Engineer greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on Skype -------- Original Message -------- Subject: Re: [Rxtx] RXTX Development From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am To: rxtx at qbang.org On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 13:39:42 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 12:39:42 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Wed Oct 26 13:47:36 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Wed, 26 Oct 2011 16:47:36 -0300 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: I already sended a working example of purejavacomm but "the admin" never aprobe the mail to be published to everyone :( Greetings! 2011/10/26 DERIK DEVECCHIO > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Atte: Daniel Dario Morales Salas Ingeniero Civil en Computaci?n e Inform?tica Tel?fono: 02 684 3417 Celular: 06 594 1574 Santiago, Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Wed Oct 26 13:49:14 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:49:14 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: Derrik: You may also consider creating a maven project that constains the rxtx jar and shared libraries to get new comers off and running quickly. Craig On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO wrote: > ** > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.**** > > I am now testing out PureJavaComm.**** > > ** ** > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.**** > > ** ** > > If I created such a guide, where I could I put it?**** > > ** ** > > ** ** > > ** ** > ------------------------------ > > *From:* rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* **rxtx at qbang.org > ** > *Subject:* Re: [Rxtx] RXTX Development > **** > > ** ** > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.**** > > > > **** > > That's a gross understatement. Most of the RXTX users I know have their > own version because there are so many bugs.**** > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype**** > > ** ** > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively developed? I > do > > not have the ability to grab the source at work and aside from checking > the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx**** > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:07:45 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:07:45 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: On Wed, 26 Oct 2011, DERIK DEVECCHIO wrote: > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that. > > I am now testing out PureJavaComm. > > ? > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. ?It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s.? I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution. > > ? > > If I created such a guide, where I could I put it? > The rxtx wiki is one option. You can contact me off the list if you want to do that. -- Trent Jarvi tjarvi at qbang.org From craig.raffel at gmail.com Wed Oct 26 13:51:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:51:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> References: <20111026123942.8ef0e5b4a80cef441275a6330ffad77d.02cbce43cf.wbe@email13.secureserver.net> Message-ID: That is my guess. I would possibly like to add code to handle this (at the lower levels) such that no additional considerations would have to be made for virtual serial ports. Craig On Wed, Oct 26, 2011 at 3:39 PM, wrote: > Craig, > > That doesn't happen with either native or USB serial ports. My guess would > be that it's unique to your virtual serial port driver. > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com // greenHousePC on > Skype > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Craig Raffel > Date: Wed, October 26, 2011 2:06 pm > To: rxtx at qbang.org > > What I am working with involves connecting to virtual serial port driver ( > http://tibbo.com/downloads/soi/vspdl.html). > > I have 2 issues: > > (1) SerialPort.getInputStream().available() returns negative numbers or > vary large numbers and cannot be used reliable. I have looked at the C code > and see that the value is coming from ioctl. I have a few workarounds. > > (2) The SerialEvent DATA_AVAILABLE is continuously generated where the > available data is 0 but when I attempt a read it blocks, I am confident that > no data is available on the port. > > Do you recall if these issues appeared in the past? > > Thanks, > > Craig > > On Wed, Oct 26, 2011 at 12:00 PM, Trent Jarvi wrote: > >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> I don't want to be rude but is RXTX 2.2 still being actively developed? I >>> do >>> not have the ability to grab the source at work and aside from checking >>> the >>> dates on some wiki edits I have not seen any "news". >>> >>> >> Hi Craig, >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ------------------------------ > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 12:21:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 12:21:11 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: <4EA8565B.2050207@CasaDelGato.Com> References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: On Wed, 26 Oct 2011, John G. Lussmyer wrote: > On 10/26/2011 9:00 AM, Trent Jarvi wrote: >> >> We need to push out another version of the source code shortly to address >> bugs but there isn't a great deal of need for development at this time from >> those using it. >> >> The parallel port users have fairly simple needs and are not itching to add >> more capability. >> >> The Serial port users have a few bug fixes on the mail-list. RS485/RS422 >> use the serial interface as far as I have seen which is what I did as well. >> >> What is missing for your use case? > > Maybe he is like me, and needs a full set of compiled binaries WITH the > latest bug fixes. > I simple do not have the equipment to build all the possible binaries to > distribute with my app. Hi John, What do you consider to be a full set of compiled binaries? This is probably more feasable than it was 5 years ago. -- Trent Jarvi tjarvi at qbang.org From Cougar at CasaDelGato.Com Wed Oct 26 14:20:53 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 13:20:53 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: <4EA8565B.2050207@CasaDelGato.Com> Message-ID: <4EA86BA5.3010703@CasaDelGato.Com> On 10/26/2011 11:21 AM, Trent Jarvi wrote: > > Hi John, > > What do you consider to be a full set of compiled binaries? This is > probably more feasable than it was 5 years ago. A couple of the most popular Linux's, Mac OS/X (however may different versions are needed), WinXP, Win7 (both 32 & 64 bit) From gergg at cox.net Thu Oct 27 10:28:13 2011 From: gergg at cox.net (Gregg Wonderly) Date: Thu, 27 Oct 2011 11:28:13 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> Message-ID: <4EA9869D.8040604@cox.net> On 10/26/2011 2:49 PM, Craig Raffel wrote: > Derrik: You may also consider creating a maven project that constains the rxtx > jar and shared libraries to get new comers off and running quickly. The build process should just put the shared libraries into the jar. The appropriate library can then be copied out to "temporary" directory space, and "System.load()" can then be used to load the library. This kind of packaging greatly simplifies the whole deployment issue and hides most of the issues associated with having some JNI code that needs to run. In a JVM with the security manager running, things don't work without additional permission grants. That can be documented, and JNLP, for example, can be used to load stuff and indicate what permission is needed, and then that works as well. Gregg > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > wrote: > > __ > > I was able to use it for a year without difficulty and I was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > I would like to help make this more accessible and ?less scary? for someone > trying to make their first RXTX/PureJava application. It might be nice to > have a step by step guide for making a simpleReadWrite for each of the major > IDE?s. I would want to include all the steps from how to add the .jar file > to your project and how to add the appropriate dll?s (or more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > [mailto:rxtx-bounces at qbang.org ] *On Behalf > Of *jfh at greenhousepc.com > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well.____ > > > > ____ > > That's a gross understatement. Most of the RXTX users I know have their own > version because there are so many bugs.____ > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype____ > > __ __ > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi > > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code shortly to address > bugs but there isn't a great deal of need for development at this time > from those using it. > > The parallel port users have fairly simple needs and are not itching to > add more capability. > > The Serial port users have a few bug fixes on the mail-list. RS485/RS422 > use the serial interface as far as I have seen which is what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From matt.r.stevenson at gmail.com Thu Oct 27 10:49:19 2011 From: matt.r.stevenson at gmail.com (Matt Stevenson) Date: Thu, 27 Oct 2011 11:49:19 -0500 Subject: [Rxtx] RXTX Development In-Reply-To: <4EA9869D.8040604@cox.net> References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. > Relying on this sort of process can cause problems for people working in modular frameworks like OSGi. On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > On 10/26/2011 2:49 PM, Craig Raffel wrote: > >> Derrik: You may also consider creating a maven project that constains the >> rxtx >> jar and shared libraries to get new comers off and running quickly. >> > > The build process should just put the shared libraries into the jar. The > appropriate library can then be copied out to "temporary" directory space, > and "System.load()" can then be used to load the library. This kind of > packaging greatly simplifies the whole deployment issue and hides most of > the issues associated with having some JNI code that needs to run. In a JVM > with the security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, can be > used to load stuff and indicate what permission is needed, and then that > works as well. > > Gregg > > Craig >> >> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >> ddevecchio at celestron.com >> >> wrote: >> >> __ >> >> >> I was able to use it for a year without difficulty and I was running >> 2.1.7 >> or something like that.____ >> >> I am now testing out PureJavaComm.____ >> >> __ __ >> >> >> I would like to help make this more accessible and ?less scary? for >> someone >> trying to make their first RXTX/PureJava application. It might be nice >> to >> have a step by step guide for making a simpleReadWrite for each of the >> major >> IDE?s. I would want to include all the steps from how to add the .jar >> file >> to your project and how to add the appropriate dll?s (or more jar files >> for >> PureJavaComm) to your distribution.____ >> >> __ __ >> >> >> If I created such a guide, where I could I put it?____ >> >> __ __ >> >> __ __ >> >> __ __ >> >> ------------------------------**------------------------------** >> -------------------- >> >> *From:*rxtx-bounces at qbang.org >> [mailto:rxtx-bounces at qbang.org ] *On >> Behalf >> Of *jfh at greenhousepc.com >> *Sent:* Wednesday, October 26, 2011 11:41 AM >> *To:* __rxtx at qbang.org >> >> __ >> *Subject:* Re: [Rxtx] RXTX Development >> ____ >> >> __ __ >> >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did as >> well.____ >> >> >> >> ____ >> >> >> That's a gross understatement. Most of the RXTX users I know have >> their own >> version because there are so many bugs.____ >> >> >> -- >> Julie Haugh >> Senior Design Engineer >> greenHouse Computers, LLC // jfh at greenhousepc.com >> // greenHousePC on Skype____ >> >> __ __ >> >> >> -------- Original Message -------- >> Subject: Re: [Rxtx] RXTX Development >> From: Trent Jarvi > >> Date: Wed, October 26, 2011 11:00 am >> To: rxtx at qbang.org >> >> >> >> On Wed, 26 Oct 2011, Craig Raffel wrote: >> >> > I don't want to be rude but is RXTX 2.2 still being actively >> developed? I do >> > not have the ability to grab the source at work and aside from >> checking the >> > dates on some wiki edits I have not seen any "news". >> > >> >> Hi Craig, >> >> We need to push out another version of the source code shortly to >> address >> bugs but there isn't a great deal of need for development at this >> time >> from those using it. >> >> The parallel port users have fairly simple needs and are not >> itching to >> add more capability. >> >> The Serial port users have a few bug fixes on the mail-list. >> RS485/RS422 >> use the serial interface as far as I have seen which is what I did >> as >> well. >> >> What is missing for your use case? >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Matt Stevenson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.crum at sandglass-software.com Thu Oct 27 11:14:16 2011 From: adrian.crum at sandglass-software.com (Adrian Crum) Date: Thu, 27 Oct 2011 18:14:16 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: <4EA99168.1050703@sandglass-software.com> Agreed - there is a difference between users who are deploying RxTx in an application server environment and users who are deploying RxTx in a client applet environment. -Adrian On 10/27/2011 5:49 PM, Matt Stevenson wrote: > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. > > Relying on this sort of process can cause problems for people working > in modular frameworks like OSGi. > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly > wrote: > > On 10/26/2011 2:49 PM, Craig Raffel wrote: > > Derrik: You may also consider creating a maven project that > constains the rxtx > jar and shared libraries to get new comers off and running > quickly. > > > The build process should just put the shared libraries into the > jar. The appropriate library can then be copied out to > "temporary" directory space, and "System.load()" can then be used > to load the library. This kind of packaging greatly simplifies > the whole deployment issue and hides most of the issues associated > with having some JNI code that needs to run. In a JVM with the > security manager running, things don't work without additional > permission grants. That can be documented, and JNLP, for example, > can be used to load stuff and indicate what permission is needed, > and then that works as well. > > Gregg > > Craig > > On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO > > >> wrote: > > __ > > > I was able to use it for a year without difficulty and I > was running 2.1.7 > or something like that.____ > > I am now testing out PureJavaComm.____ > > __ __ > > > I would like to help make this more accessible and "less > scary" for someone > trying to make their first RXTX/PureJava application. It > might be nice to > have a step by step guide for making a simpleReadWrite for > each of the major > IDE's. I would want to include all the steps from how to > add the .jar file > to your project and how to add the appropriate dll's (or > more jar files for > PureJavaComm) to your distribution.____ > > __ __ > > > If I created such a guide, where I could I put it?____ > > __ __ > > __ __ > > __ __ > > > -------------------------------------------------------------------------------- > > *From:*rxtx-bounces at qbang.org > > > [mailto:rxtx-bounces at qbang.org > >] *On Behalf > Of *jfh at greenhousepc.com > > > *Sent:* Wednesday, October 26, 2011 11:41 AM > *To:* __rxtx at qbang.org > > > > __ > *Subject:* Re: [Rxtx] RXTX Development > ____ > > __ __ > > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well.____ > > > > ____ > > > That's a gross understatement. Most of the RXTX users I > know have their own > version because there are so many bugs.____ > > > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > > // greenHousePC on Skype____ > > __ __ > > > -------- Original Message -------- > Subject: Re: [Rxtx] RXTX Development > From: Trent Jarvi >> > Date: Wed, October 26, 2011 11:00 am > To: rxtx at qbang.org > > > > > > On Wed, 26 Oct 2011, Craig Raffel wrote: > > > I don't want to be rude but is RXTX 2.2 still being actively > developed? I do > > not have the ability to grab the source at work and aside from > checking the > > dates on some wiki edits I have not seen any "news". > > > > Hi Craig, > > We need to push out another version of the source code > shortly to address > bugs but there isn't a great deal of need for > development at this time > from those using it. > > The parallel port users have fairly simple needs and > are not itching to > add more capability. > > The Serial port users have a few bug fixes on the > mail-list. RS485/RS422 > use the serial interface as far as I have seen which is > what I did as > well. > > What is missing for your use case? > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx____ > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Matt Stevenson. > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig.raffel at gmail.com Thu Oct 27 11:18:47 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Thu, 27 Oct 2011 13:18:47 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> <9FAD7E5EBDD14B4981E81E66FA62E5C704F8425653@nubula-vm2> <4EA9869D.8040604@cox.net> Message-ID: I have looked at the logs of my virtual serial port driver and see the message "vsp_ioctl_S unknown CMD 0x545D". I am willing to bet this is why my SerialPort.getInputStream().available() is sending me enormous/tiny numbers that are not correlated to data in the buffer. I am going to see if I can make a workaround/fix it in the driver code. Craig On Thu, Oct 27, 2011 at 12:49 PM, Matt Stevenson wrote: > The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. >> > Relying on this sort of process can cause problems for people working in > modular frameworks like OSGi. > > > On Thu, Oct 27, 2011 at 11:28 AM, Gregg Wonderly wrote: > >> On 10/26/2011 2:49 PM, Craig Raffel wrote: >> >>> Derrik: You may also consider creating a maven project that constains the >>> rxtx >>> jar and shared libraries to get new comers off and running quickly. >>> >> >> The build process should just put the shared libraries into the jar. The >> appropriate library can then be copied out to "temporary" directory space, >> and "System.load()" can then be used to load the library. This kind of >> packaging greatly simplifies the whole deployment issue and hides most of >> the issues associated with having some JNI code that needs to run. In a JVM >> with the security manager running, things don't work without additional >> permission grants. That can be documented, and JNLP, for example, can be >> used to load stuff and indicate what permission is needed, and then that >> works as well. >> >> Gregg >> >> Craig >>> >>> On Wed, Oct 26, 2011 at 3:36 PM, DERIK DEVECCHIO < >>> ddevecchio at celestron.com >>> >> wrote: >>> >>> __ >>> >>> >>> I was able to use it for a year without difficulty and I was running >>> 2.1.7 >>> or something like that.____ >>> >>> I am now testing out PureJavaComm.____ >>> >>> __ __ >>> >>> >>> I would like to help make this more accessible and ?less scary? for >>> someone >>> trying to make their first RXTX/PureJava application. It might be >>> nice to >>> have a step by step guide for making a simpleReadWrite for each of the >>> major >>> IDE?s. I would want to include all the steps from how to add the .jar >>> file >>> to your project and how to add the appropriate dll?s (or more jar >>> files for >>> PureJavaComm) to your distribution.____ >>> >>> __ __ >>> >>> >>> If I created such a guide, where I could I put it?____ >>> >>> __ __ >>> >>> __ __ >>> >>> __ __ >>> >>> ------------------------------**------------------------------** >>> -------------------- >>> >>> *From:*rxtx-bounces at qbang.org >>> [mailto:rxtx-bounces at qbang.org ] *On >>> Behalf >>> Of *jfh at greenhousepc.com >>> *Sent:* Wednesday, October 26, 2011 11:41 AM >>> *To:* __rxtx at qbang.org >>> >>> __ >>> *Subject:* Re: [Rxtx] RXTX Development >>> ____ >>> >>> __ __ >>> >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did as >>> well.____ >>> >>> >>> >>> ____ >>> >>> >>> That's a gross understatement. Most of the RXTX users I know have >>> their own >>> version because there are so many bugs.____ >>> >>> >>> -- >>> Julie Haugh >>> Senior Design Engineer >>> greenHouse Computers, LLC // jfh at greenhousepc.com >>> // greenHousePC on Skype____ >>> >>> __ __ >>> >>> >>> -------- Original Message -------- >>> Subject: Re: [Rxtx] RXTX Development >>> From: Trent Jarvi > >>> Date: Wed, October 26, 2011 11:00 am >>> To: rxtx at qbang.org >>> >>> >>> >>> On Wed, 26 Oct 2011, Craig Raffel wrote: >>> >>> > I don't want to be rude but is RXTX 2.2 still being actively >>> developed? I do >>> > not have the ability to grab the source at work and aside from >>> checking the >>> > dates on some wiki edits I have not seen any "news". >>> > >>> >>> Hi Craig, >>> >>> We need to push out another version of the source code shortly to >>> address >>> bugs but there isn't a great deal of need for development at this >>> time >>> from those using it. >>> >>> The parallel port users have fairly simple needs and are not >>> itching to >>> add more capability. >>> >>> The Serial port users have a few bug fixes on the mail-list. >>> RS485/RS422 >>> use the serial interface as far as I have seen which is what I did >>> as >>> well. >>> >>> What is missing for your use case? >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx____ >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Matt Stevenson. > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Thu Oct 27 12:22:18 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Thu, 27 Oct 2011 11:22:18 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Fri Oct 28 02:00:26 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Fri, 28 Oct 2011 09:00:26 +0100 Subject: [Rxtx] RXTX Development In-Reply-To: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> References: <20111027112218.8ef0e5b4a80cef441275a6330ffad77d.e7109574a1.wbe@email13.secureserver.net> Message-ID: ....and so should the build process have to deal with the many ways in which it is deployed? The developer of the application should address their own deployment requirements. It's really is not that difficult! From Bruce.Griffith at se-eng.com Fri Oct 28 13:03:25 2011 From: Bruce.Griffith at se-eng.com (Bruce Griffith) Date: Fri, 28 Oct 2011 13:03:25 -0600 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <007701cc95a4$47561220$d6023660$@Griffith@se-eng.com> > The Serial port users have a few bug fixes on the mail-list. ... > What is missing for your use case? Here's my list, not necessarily in order of importance: 1. Metadata about enumerated ports RXTX should provide extended metadata about discovered ports when available, specifically device and vendor IDs. Serial and parallel ports provided by chipsets are getting rare. USB and Bluetooth ports are getting much more common. 2. Port locking on LINUX Most newer LINUX distros provide a port locking mechanism and/or change the path where port locks are supposed to be held. 3. Exceptions, error handling, and reporting Most errors report "port in use", even when that isn't the problem. Some native code errors are unhandled and can lead to downstream issues that are hard to diagnose. I can't even count the number of "RXTX bugs" that were really caused by application errors, but attributed to RXTX because of misleading exception handling or unhandled native code errors. We've found RXTX to be pretty stable when things are working, but not very good at attributing errors to their source (i.e. bad at self-defense). 4. Port name nomenclature / prefixes If you end up with Java calling into a CYGWIN shell, port names need to be prefixed with "/dev/" (e.g. "/dev/com15"), and there can be issues using ports higher than COM16 (a CYGWIN build option). Otherwise, Windows ports need to be prefixed with "\\.\" for ports numbered COM10 or higher (e.g. \\.\COM21). On LINUX there are myriad prefixes for ports provided by add-on cards, USB, and other adapters. It would be nice if RXTX did not limit prefixes to the ones hardcoded into the native code. Since port prefixes are unique to the platform, it would be really nice if the native code handled the problem in an OS-specific way so that Java application code doesn't need to know about the underlying OS. 5. Dynamic ports Bluetooth and USB ports can be dynamically added and removed while RXTX is active. It would be nice to have better support for these. In our implementation, we explicitly look for and ignore Bluetooth ports because they cause problems. I have code I can contribute for Windows for some of these things ... Bruce Griffith Sage Electronic Engineering, LLC From marcos.truchado at gmail.com Mon Oct 10 15:16:46 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Mon, 10 Oct 2011 23:16:46 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem Message-ID: Hi all I'm currently developing an application using SMSLib. The problem is that the compatibility list of this library is only listing old modems, this is, if I want to develop something today using it, my chances to get something from this list are none. I have an old and nice Motorola L6 that I'm using while I'm able to solve my problem The problem is that for this application we are trying to use a Wavecom Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility list are old models that cannot be purchased, but this should do the job. But I'm getting an error in RXTX, first of all let me show you the information about my modem: [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and address 6 [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1417.680251] usb 6-1: Product: WAVECOM MODEM [ 1417.680253] usb 6-1: Manufacturer: WAVECOM [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device And now the error itself 0 [main] INFO smslib - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways. This software is distributed under the terms of the Apache v2.0 License. Web Site: http://smslib.org 1 [main] INFO smslib - Version: 3.5.1 1 [main] INFO smslib - JRE Version: 1.6.0_27 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop 4 [main] DEBUG smslib - Initialized. 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... 14 [main] INFO smslib - Queue directory not defined. Queued messages will not be saved to filesystem. 15 [main] DEBUG smslib - Initialized. 15 [main] DEBUG smslib - Initialized. 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using Wavecom (Generic) AT Handler. 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is disabled. 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port mode. 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 91 [Thread-4] DEBUG smslib - Initialized. 91 [Thread-4] DEBUG smslib - Initialized. 92 [Thread-4] DEBUG smslib - Initialized. 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread started. 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort. nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! java.io.IOException: Input/output error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) at org.smslib .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) at org.smslib .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) at org.smslib.threading.AServiceThread.run(AServiceThread.java:105) 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! [...] As you can see the error is throw by RXTX itself. First thing to note: I'm using Linux x86_64, but I tried both Windows and Linux x86 and I got the same results. No matter what I try, everytime I got an I/O error and the modem get disconneasdfcted. If you need any other information, I'm more than happy to provide it. Any ideas would be very welcome. Thanks and Regards. Marcos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 16:46:26 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 18:46:26 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E9375C2.5050806@howardz.com> I just thought I'd mention that I have been using PureJavaComm for serial I/O for several months. purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar It uses the exact same calls as rxtx. Only the include files are different. I have heard from Macintosh users that my s/w works properly. Have not heard from Linux users, as there might not be any. Regards, Howard From jfh at greenhousepc.com Mon Oct 10 17:09:56 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Mon, 10 Oct 2011 16:09:56 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From damorales at gmail.com Mon Oct 10 17:11:21 2011 From: damorales at gmail.com (Daniel Morales Salas) Date: Mon, 10 Oct 2011 20:11:21 -0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I've been using purejavacomm under linux and it works perfect! El 10/10/2011 19:53, "HowardZ at howardz.com" escribi?: > I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From HowardZ at howardz.com Mon Oct 10 17:48:13 2011 From: HowardZ at howardz.com (HowardZ at howardz.com) Date: Mon, 10 Oct 2011 19:48:13 -0400 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> Message-ID: <4E93843D.4060906@howardz.com> Julie, PureJavaComm is here: http://wwws.sparetimelabs.com/ and the repository with latest source and binaries is here: https://github.com/nyholku/purejavacomm The only negative I have heard about the purejavacomm.jar/jna.jar is that it can not do high speed serial I/O speeds. In my application I use several COM ports simultaneously with baud rates up to 38400 baud, but the actual throughput of data is low. Howard On 10/10/2011 19:09, jfh at greenhousepc.com wrote: > Howard, > > What's the license? Where's the source repository? How well do you > plan to actually listen to users? > > I need to get off of RXTX at some point as it seems to be mired in its > own problems. It'll take me 3 to 6 months to validate it against my > systems, but I have plenty of time as the sun is on the wrong side of > the equator for my business ;) > -- > Julie Haugh > Senior Design Engineer > greenHouse Computers, LLC // jfh at greenhousepc.com > // greenHousePC on Skype > > > -------- Original Message -------- > Subject: [Rxtx] PureJavaComm > From: "HowardZ at howardz.com " > > > Date: Mon, October 10, 2011 5:46 pm > To: rxtx at qbang.org > > I just thought I'd mention that I have been using PureJavaComm for > serial I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source > jna.jar > > It uses the exact same calls as rxtx. Only the include files are > different. > > I have heard from Macintosh users that my s/w works properly. > Have not heard from Linux users, as there might not be any. > > Regards, > > Howard > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From msemtd at googlemail.com Tue Oct 11 02:27:15 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:27:15 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: Anyone having problems with unwanted logging in purejavacomm on Win32? The idiom in use for logging logic throughout WinAPI.java is log = log & log(...) but surely this should be log = log && log(...) otherwise the log method would be called anyway. Regards, Michael Erskine. From msemtd at googlemail.com Tue Oct 11 02:36:40 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 11 Oct 2011 09:36:40 +0100 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: On 11 October 2011 09:27, Michael Erskine wrote: > Anyone having problems with unwanted logging in purejavacomm on Win32? > > The idiom in use for logging logic throughout WinAPI.java is log = log > & log(...) but surely this should be log = log && log(...) otherwise > the log method would be called anyway. OK, I see what the problem is: the zip file on the page http://www.sparetimelabs.com/purejavacomm/index.html is way out of date with respect to the github sources. This is not made obvious on that page an perhaps it should be updated. Regards, Michael Erskine. From Kustaa.Nyholm at planmeca.com Tue Oct 11 04:20:55 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 13:20:55 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 11:36, "Michael Erskine" wrote: >On 11 October 2011 09:27, Michael Erskine wrote: >> Anyone having problems with unwanted logging in purejavacomm on Win32? >> >> The idiom in use for logging logic throughout WinAPI.java is log = log >> & log(...) but surely this should be log = log && log(...) otherwise >> the log method would be called anyway. > >OK, I see what the problem is: the zip file on the page >http://www.sparetimelabs.com/purejavacomm/index.html is way out of >date with respect to the github sources. This is not made obvious on >that page an perhaps it should be updated. > >Regards, >Michael Erskine. >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > Ok, I'll make it more obvious next time I update the git, which I hope will happen within weeks. There are two know issues in the current latest source code in the git, both are Windows only: 1) Trying to open COM ports that are in use can take a up to 9 minutes to throw an exception. 2) Closing a port that has a read/write call in progress may crash the JVM I've got a fix for both (I hope) and plan to update the git as my spare time permits. br Kusti From bschlining at gmail.com Tue Oct 11 09:16:14 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:14 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E9375C2.5050806@howardz.com> References: <4E9375C2.5050806@howardz.com> Message-ID: I just thought I'd mention that I have been using PureJavaComm for serial > I/O for several months. > purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar > > I have heard from Macintosh users that my s/w works properly. I tried it out as a drop in replacement for RXTX against RS422 (used to talk to pro VCR's). Unfortunately, purejavacomm did not read the data correctly; too bad, as it would've made deployment much easier. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bschlining at gmail.com Tue Oct 11 09:16:53 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 08:16:53 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <4E9375C2.5050806@howardz.com> Message-ID: > > > I just thought I'd mention that I have been using PureJavaComm for serial >> I/O for several months. >> purejavacomm.jar uses JNI versus JNA and depends on open source jna.jar >> >> I have heard from Macintosh users that my s/w works properly. >> > > I tried it out as a drop in replacement for RXTX against RS422 (used to > talk to pro VCR's). Unfortunately, purejavacomm did not read the data > correctly; too bad, as it would've made deployment much easier. > p.s. I ran this testing on a recent Mac. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Tue Oct 11 10:06:45 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Tue, 11 Oct 2011 09:06:45 -0700 Subject: [Rxtx] PureJavaComm Message-ID: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 10:28:33 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 19:28:33 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: On 10/11/11 19:06, "jfh at greenhousepc.com" wrote: >Brian, > > >Have you tested the RS-232 functions on Mac OS X? It would be good to >know if the problem is "all serial connections" on the Mac, or just >RS-422. Not that I use 422, on account of I use 232 and 485 ... PureJavaComm was developed 100% on Mac using FTDI USB/Serial adapter, I only visited Windows to test the Windows specific stuff. Would be interesting to know more about why and how it does not work with RS422. br Kusti From bschlining at gmail.com Tue Oct 11 10:44:40 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 09:44:40 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> References: <20111011090645.8ef0e5b4a80cef441275a6330ffad77d.89998a0dc0.wbe@email13.secureserver.net> Message-ID: <1B6A925A474546F298FF216C56AD1870@gmail.com> On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: > Brian, > > Have you tested the RS-232 functions on Mac OS X? No, I was just curious if purejavacomm would work for my VCR control software. (The source is at http://code.google.com/p/vcr4j/). The VCR RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, with purejavacomm the VCR responses weren't being read correctly. -- Brian Schlining From Kustaa.Nyholm at planmeca.com Tue Oct 11 11:38:42 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 20:38:42 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <1B6A925A474546F298FF216C56AD1870@gmail.com> Message-ID: On 10/11/11 19:44, "Brian Schlining" wrote: >On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com wrote: >> Brian, >> >> Have you tested the RS-232 functions on Mac OS X? >No, I was just curious if purejavacomm would work for my VCR control >software. (The source is at http://code.google.com/p/vcr4j/). The VCR >RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, >with purejavacomm the VCR responses weren't being read correctly. So you (your software) were able to enumerate and open a port, correct? Some data was written and read, but the received data was wrong, correct? As PureJavaComm SerialPort input/output streams are very light wrappers around the Mac OS X (unix) read / write calls and they work on my test cases and work for number of people, I venture to conject that the problem is in the interpretation of what the actual contract/service promise between JavaComm and the application is i.e. either there is a bug in PureJavaComm or the application makes assumptions that are not inline what JavaComm spec says but which happen to work with JavaComm but not PureJavaComm. Without access to the required hardware it is difficult to go any further. If you are interested in participating by testing and troubleshootin I'm ready to "hold your hand". br Kusti From bschlining at gmail.com Tue Oct 11 12:50:31 2011 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 11 Oct 2011 11:50:31 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: Hi Kusti, Hand holding would be much appreciated. I can set aside some time next week to work though things. Will you be around then? -- Brian Schlining On Tuesday, October 11, 2011 at 10:38 AM, Kustaa Nyholm wrote: > On 10/11/11 19:44, "Brian Schlining" wrote: > > > On Tuesday, October 11, 2011 at 9:06 AM, jfh at greenhousepc.com (mailto:jfh at greenhousepc.com) wrote: > > > Brian, > > > > > > Have you tested the RS-232 functions on Mac OS X? > > No, I was just curious if purejavacomm would work for my VCR control > > software. (The source is at http://code.google.com/p/vcr4j/). The VCR > > RS422 stuff has worked with Sun's old javacomm as well as RXTX. However, > > with purejavacomm the VCR responses weren't being read correctly. > > So you (your software) were able to enumerate and open a port, correct? > > Some data was written and read, but the received data was wrong, correct? > > As PureJavaComm SerialPort input/output streams are very light wrappers > around the Mac OS X (unix) read / write calls and they work on my test > cases and work for number of people, I venture to conject that the problem > is in the interpretation of what the actual contract/service promise > between JavaComm and the application is i.e. either there is a bug in > PureJavaComm or the application makes assumptions that are not inline > what JavaComm spec says but which happen to work with JavaComm but not > PureJavaComm. > > Without access to the required hardware it is difficult to go any further. > > If you are interested in participating by testing and troubleshootin > I'm ready to "hold your hand". > > br Kusti > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org (mailto:Rxtx at qbang.org) > http://mailman.qbang.org/mailman/listinfo/rxtx From ddevecchio at celestron.com Tue Oct 11 13:17:32 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 12:17:32 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: <4E93843D.4060906@howardz.com> References: <20111010160956.8ef0e5b4a80cef441275a6330ffad77d.3c37dabc0e.wbe@email13.secureserver.net> <4E93843D.4060906@howardz.com> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. Could someone elaborate on that? What is the definition of "high speed". I have an application that runs at 115.2kbps. A typical push (PC to device) would be on the order of 100k bytes. Is this considered "high speed"? > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > HowardZ at howardz.com > Sent: Monday, October 10, 2011 4:48 PM > To: jfh at greenhousepc.com > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > Julie, > > PureJavaComm is here: http://wwws.sparetimelabs.com/ > and the repository with latest source and binaries is here: > https://github.com/nyholku/purejavacomm > > The only negative I have heard about the purejavacomm.jar/jna.jar is > that it can not do high speed serial I/O speeds. > In my application I use several COM ports simultaneously with baud rates > up to 38400 baud, but the actual throughput of data is low. > > Howard > From marcos.truchado at gmail.com Tue Oct 11 13:28:51 2011 From: marcos.truchado at gmail.com (Marcos Truchado) Date: Tue, 11 Oct 2011 21:28:51 +0200 Subject: [Rxtx] Wavecom Fastrack Xtend FXT009, SMSLib and RXTX related problem In-Reply-To: References: Message-ID: Hi all again: I wasn't expecting this!, this is clearly a bug in SMSLib. Just by mistake I set the manufacturer to Siemens (from Wavecom), and guess what?, I can send, I can receive, and the modem is working properly. I set the manufacturer back to Wavecom and my I/O error is back. So It seems to be a problem with the Wavecom handler and the Wavecom Fastrack FXT009. I say it again, I think that getting this modem to work is an important milestone for SMSLib, cause most of the modems listed in the compatibility table are very old and difficult to get. Think that the Fastrack FXT009 is nothing but the replacement for the Wavecom Supreme 20, fully supported by SMSLib. One more thing, I was not able to find the version 3.5.1 in the maven2 repository. I have time, and I have here (build by myself) a maven 2 artifact working (I modified the pom and updated the jar file), if you want and allow me to do so, I can update to the official maven repo: http://smslib.googlecode.com/svn/maven2 Best regards. Marcos. On Mon, Oct 10, 2011 at 11:16 PM, Marcos Truchado wrote: > Hi all > > I'm currently developing an application using SMSLib. The problem is that > the compatibility list of this library is only listing old modems, this is, > if I want to develop something today using it, my chances to get something > from this list are none. I have an old and nice Motorola L6 that I'm using > while I'm able to solve my problem > > The problem is that for this application we are trying to use a Wavecom > Fastrack Xtend FXT009, since all wavecom modems listed in the compatibility > list are old models that cannot be purchased, but this should do the job. > But I'm getting an error in RXTX, first of all let me show you the > information about my modem: > > > [ 1417.523108] usb 6-1: new full speed USB device using ohci_hcd and > address 6 > [ 1417.680246] usb 6-1: New USB device found, idVendor=114f, idProduct=1234 > [ 1417.680249] usb 6-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 1417.680251] usb 6-1: Product: WAVECOM MODEM > [ 1417.680253] usb 6-1: Manufacturer: WAVECOM > [ 1417.680254] usb 6-1: SerialNumber: BH1270174208100 > [ 1417.682301] cdc_acm 6-1:1.0: ttyACM0: USB ACM device > > And now the error itself > > 0 [main] INFO smslib - SMSLib: A Java API library for sending and > receiving SMS via a GSM modem or other supported gateways. > This software is distributed under the terms of the Apache v2.0 License. > Web Site: http://smslib.org > 1 [main] INFO smslib - Version: 3.5.1 > 1 [main] INFO smslib - JRE Version: 1.6.0_27 > 1 [main] INFO smslib - JRE Impl Version: 20.2-b06 > 1 [main] INFO smslib - O/S: Linux / amd64 / 2.6.37.6-0.7-desktop > 4 [main] DEBUG smslib - Initialized. > 5 [NotifyQueueManager] DEBUG smslib - NotifyQueueManager running... > 14 [main] INFO smslib - Queue directory not defined. Queued messages > will not be saved to filesystem. > 15 [main] DEBUG smslib - Initialized. > 15 [main] DEBUG smslib - Initialized. > 15 [DelayQueueManager] DEBUG smslib - DelayQueueManager running... > 16 [Thread-4] INFO smslib - GTW: gateway: Starting gateway, using > Wavecom (Generic) AT Handler. > 17 [Thread-4] INFO smslib - GTW: gateway: Comm port flushing is > disabled. > 17 [Thread-4] INFO smslib - GTW: gateway: Using polled serial port > mode. > 17 [Thread-4] INFO smslib - GTW: gateway: Opening: /dev/ttyACM0 @57600 > 91 [Thread-4] DEBUG smslib - Initialized. > 91 [Thread-4] DEBUG smslib - Initialized. > 92 [Thread-4] DEBUG smslib - Initialized. > 92 [CNMIEmulatorProcessor [gateway]] DEBUG smslib - ** disabled ** > 92 [Thread-4] DEBUG smslib - GTW: gateway: ModemReader thread started. > 93 [Thread-4] DEBUG smslib - GTW: gateway: AsyncNotifier thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: AsyncMessageProcessor thread > started. > 94 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 1094 [Thread-4] DEBUG smslib - GTW: gateway: SEND :(27) > 1295 [Thread-4] DEBUG smslib - GTW: gateway: SEND :+++ > 1495 [Thread-4] DEBUG smslib - GTW: gateway: SEND :ATZ(cr) > 1696 [Thread-4] DEBUG smslib - GTW: gateway: clearBuffer() called. > 2696 [Thread-4] DEBUG smslib - GTW: gateway: SEND :AT+CFUN=1(cr) > 2897 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort. > nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2901 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > java.io.IOException: Input/output error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1596) > at org.smslib > .modem.SerialModemDriver.portHasData(SerialModemDriver.java:134) > at org.smslib > .modem.SerialModemDriver$PortReader.process(SerialModemDriver.java:215) > at org.smslib > .threading.AServiceThread.run(AServiceThread.java:105) > 2902 [PortReader() [/dev/ttyACM0]] ERROR smslib - Error! > [...] > > As you can see the error is throw by RXTX itself. First thing to note: I'm > using Linux x86_64, but I tried both Windows and Linux x86 and I got the > same results. No matter what I try, everytime I got an I/O error and the > modem get disconneasdfcted. If you need any other information, I'm more than > happy to provide it. Any ideas would be very welcome. > > Thanks and Regards. > > Marcos. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kustaa.Nyholm at planmeca.com Tue Oct 11 13:46:28 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 22:46:28 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 21:50, "Brian Schlining" wrote: > Hi Kusti, > >Hand holding would be much appreciated. I can set aside some time next >week to work though things. Will you be around then? I'll be here. br Kusti From Kustaa.Nyholm at planmeca.com Tue Oct 11 14:17:23 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Tue, 11 Oct 2011 23:17:23 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >> The only negative I have heard about the purejavacomm.jar/jna.jar is >> that it can not do high speed serial I/O speeds. > >Could someone elaborate on that? What is the definition of "high speed". > I have an application that runs at 115.2kbps. A typical push (PC to >device) would be on the order of 100k bytes. Is this considered "high >speed"? I've done some measurements, just have not had the time to write a proper report. Some initial (take with grain of salt) results: These are measures with four different test programs with a loopback connector ie machine talking to itself using one port. The test program just sends packets (ie chunks of n bytes) to itself at different baud rates and times the total transfer time. Up to certain baud rate the achieved baud rate equals the theoretical (ie set) baud rate but then it starts to 'saturate'. Packet size here simply means the number of bytes submitted to the write() command at once. Obviously the bigger the packet the smaller the effect of any overhead. I've tested both a threaded implementation and select() based one. Written in C and Java using both RXTX and PureJavaComm. On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 baud after which it gets no faster. At packet size 4 we get about 38000 baud. To achieve 115000 baud the packet size needs to be 32. So that is the base line ie you can't get faster than that in that hardware. Baud rate here refers to the effective baud rate ie number bytes times ten divided by the time it takes to transfer those bytes. The limiting factor here is most likely the FTDI USB/Serial adapter, which has some inherent buffering delays. No Mac has a built in serial port so that is about that for most mortals. Now, basically the same code but written in Java using PureJavaComm achieves almost the same. Running the same Java code in Windows XP in Parallels Desktop virtual PC achieves also about the same performance, which is a testimony to the power of the virtual PC concept. And has the same limitation of using FTDI USB/Serial adapter. I've got no results yet for a real PC with real serial port, nor a C code for Windows as a reference. I've now got a real PC with serial port so I hope to run some test sooner or later. Interestingly the same Java code using RXTX achieves only about half the performance in Windows XP under parallels. Also, it crashes the JVM when the packet size/baud rate gets higher than 16/38400. So initial conclusion, is that to get good performance packet size is critical, no matter if you program in C or Java using RXTX or PureJavaComm. JNA/JNI seems to play no role here. Using a limiting hardware like USB serial port is a real killer with small packet size. PureJavaComm seems to have less overhead than RXTX at least in a virtual PC. Also, it seems that it is easy to crash RXTX and bring the JVM down, which should never happen. Apart from the known issue with closing a pending read/write, this has never happened to me with PureJavaComm. Hope this helps. br Kusti From tjarvi at qbang.org Tue Oct 11 14:22:55 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 11 Oct 2011 14:22:55 -0600 (MDT) Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: On Tue, 11 Oct 2011, Kustaa Nyholm wrote: > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > I've not seen this crash with real computers. It may have to do with the vehavior of the parallels you mention. If you could file a bug with the stack traces, we could see if its related to a real world issue. -- Trent Jarvi tjarvi at qbang.org From ddevecchio at celestron.com Tue Oct 11 17:01:33 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Tue, 11 Oct 2011 16:01:33 -0700 Subject: [Rxtx] PureJavaComm In-Reply-To: References: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94240C4@nubula-vm2> Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704D94241DF@nubula-vm2> Kustaa Nyholm, Thanks for that interesting data. That was just the kind of thing I was looking for. When someone said you might have trouble with high speed I was thinking you pureJavaComm might not have a setting for anything above 28 kbps. As it happens, my current RXTX application uses packets that are on the order of 500 bytes (95% of all packets are about that size). Using that application and the aid of an oscilloscope I was able to convince myself that _most_ of deviations from theoretical bandwidth were caused by the time delays associated with two factors. 1. The amount of grouping that was done by the Serial to USB adapter before passing data to the USB stream (typically 1 ms per packet) 2. The amount of time it took windows/rat/JVM to deliver that data to my application. (typically 4-10ms but sometimes up to 50ms per packet). I always just assumed that was mostly Windows. > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Kustaa Nyholm > Sent: Tuesday, October 11, 2011 1:17 PM > To: rxtx at qbang.org > Subject: Re: [Rxtx] PureJavaComm > > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > > >On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said > >> The only negative I have heard about the purejavacomm.jar/jna.jar is > >> that it can not do high speed serial I/O speeds. > > > >Could someone elaborate on that? What is the definition of "high speed". > > I have an application that runs at 115.2kbps. A typical push (PC to > >device) would be on the order of 100k bytes. Is this considered "high > >speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. > To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. > > Hope this helps. > > br Kusti > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From gergg at cox.net Tue Oct 11 21:16:11 2011 From: gergg at cox.net (Gregg Wonderly) Date: Tue, 11 Oct 2011 22:16:11 -0500 Subject: [Rxtx] PureJavaComm In-Reply-To: References: Message-ID: <4E95067B.3090407@cox.net> On 10/11/2011 3:17 PM, Kustaa Nyholm wrote: > On 10/11/11 22:17, "DERIK DEVECCHIO" wrote: > >> On Monday, October 10, 2011 4:48 PM jfh at greenhousepc.com said >>> The only negative I have heard about the purejavacomm.jar/jna.jar is >>> that it can not do high speed serial I/O speeds. >> >> Could someone elaborate on that? What is the definition of "high speed". >> I have an application that runs at 115.2kbps. A typical push (PC to >> device) would be on the order of 100k bytes. Is this considered "high >> speed"? > > > I've done some measurements, just have not had the time to write a proper > report. > > Some initial (take with grain of salt) results: > > These are measures with four different test programs with a loopback > connector > ie machine talking to itself using one port. > > The test program just sends packets (ie chunks of n bytes) to itself > at different baud rates and times the total transfer time. Up to certain > baud rate the achieved baud rate equals the theoretical (ie set) baud rate > but then it starts to 'saturate'. > > Packet size here simply means the number of bytes submitted to the write() > command at once. Obviously the bigger the packet the smaller the effect > of any overhead. > > > I've tested both a threaded implementation and select() based one. Written > in C and Java using both RXTX and PureJavaComm. > > > On Mac OS X with one packet size 1 a pure C-code can achieve about 11000 > baud > after which it gets no faster. At packet size 4 we get about 38000 baud. To > achieve 115000 baud the packet size needs to be 32. > > So that is the base line ie you can't get faster than that in that > hardware. > > Baud rate here refers to the effective baud rate ie number bytes times ten > divided by the time it takes to transfer those bytes. > > > The limiting factor here is most likely the FTDI USB/Serial adapter, which > has some inherent buffering delays. > > No Mac has a built in serial port so that is about that for most mortals. > > Now, basically the same code but written in Java using PureJavaComm > achieves almost the same. > > Running the same Java code in Windows XP in Parallels Desktop > virtual PC achieves also about the same performance, which is a testimony > to the power of the virtual PC concept. And has the same limitation > of using FTDI USB/Serial adapter. > > I've got no results yet for a real PC with real serial port, nor a > C code for Windows as a reference. I've now got a real PC with > serial port so I hope to run some test sooner or later. > > Interestingly the same Java code using RXTX achieves only about half > the performance in Windows XP under parallels. > > Also, it crashes the JVM when the packet size/baud rate > gets higher than 16/38400. > > So initial conclusion, is that to get good performance packet size is > critical, no matter if you program in C or Java using RXTX or PureJavaComm. > > JNA/JNI seems to play no role here. > > Using a limiting hardware like USB serial port is a real killer with > small packet size. > > PureJavaComm seems to have less overhead than RXTX at least in a virtual > PC. > > Also, it seems that it is easy to crash RXTX and bring the JVM down, which > should never happen. Apart from the known issue with closing a pending > read/write, this has never happened to me with PureJavaComm. What happens on the pending read/write that causes the crash? It should be no different than closing an open serial port in a C program. Is there some context that doesn't clear itself correctly in the JVM->JNI context? Gregg From Kustaa.Nyholm at planmeca.com Tue Oct 11 21:35:35 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 12 Oct 2011 06:35:35 +0300 Subject: [Rxtx] PureJavaComm In-Reply-To: Message-ID: On 10/11/11 23:22, "Trent Jarvi" wrote: > >I've not seen this crash with real computers. It may have to do with the >vehavior of the parallels you mention. If you could file a bug with the >stack traces, we could see if its related to a real world issue. I agree, it can be because of the virtualized PC. Here is the crash log, it is pretty terse: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8027ad, pid=2344, tid=3420 # # JRE version: 6.0_15-b03 # Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 ) # Problematic frame: # V [jvm.dll+0x27ad] # and here is an other one: WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2 1 1200 1199.640108 Invalid memory access of location 0x10a7169d8 rip=0x10a60b12f the '1' and the '1200 1199.640108' are the test program outputs. Come to think of it, my notes are a bit ambiguous, maybe these are from the same crash, in which case their order is wrong. Anyway, this was repeatable so I should be able reproduce this next time I have some spare time available for this project. cheers Kusti From dante at supridatta.com.br Tue Oct 18 11:34:51 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:34:51 -0200 Subject: [Rxtx] Doubt Message-ID: Hello, I have a simple question: "How to send and receive HEX information". The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. IF I SEND: "02 A3" THE RXTX SEND THIS: "48 50 32 65 51" That correct? THanks -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias at diekrieger.at Tue Oct 18 11:50:32 2011 From: tobias at diekrieger.at (Tobias Krieger) Date: Tue, 18 Oct 2011 19:50:32 +0200 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> You send 5 characters (ASCII) 0=48 2=50 space = 32 Capital A = 65 3= 51 It seems correct. -Tobias Am 18.10.2011 um 19:34 schrieb Dante Basso: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: From jredman at ergotech.com Tue Oct 18 11:53:18 2011 From: jredman at ergotech.com (Jim Redman) Date: Tue, 18 Oct 2011 11:53:18 -0600 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <4E9DBD0E.5060405@ergotech.com> Dante, Please post some code so we can see what you are doing. 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" Which (without testing) I think you get from: os.write("02 A3".getBytes()) or similar byte[] myBytes = new byte[]{0x02, 0xA3}; os.write (myBytes) would write the two bytes. Jim On 10/18/2011 11:34 AM, Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he > converts my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From andy at g0poy.com Tue Oct 18 11:57:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Tue, 18 Oct 2011 18:57:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: Message-ID: <20111018185740.13450106@workstation.home> You are sending ASCII characters. 48 = "0" 50 = "2" 32 = space etc. send a number, is 2 (0x02) or 163 (0xA3) Andy On Tue, 18 Oct 2011 15:34:51 -0200 Dante Basso wrote: > Hello, I have a simple question: "How to send and receive HEX information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 From dante at supridatta.com.br Tue Oct 18 11:58:12 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 15:58:12 -0200 Subject: [Rxtx] Doubt In-Reply-To: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> References: <714951A1-39B8-43C2-B71D-ADD28F73E872@diekrieger.at> Message-ID: I don't won't to send ASCII, I want to send HEX: 02 (HEX) 3A (HEX) How can I do that? 2011/10/18 Tobias Krieger > You send 5 characters (ASCII) > > 0=48 > 2=50 > space = 32 > Capital A = 65 > 3= 51 > > It seems correct. > > -Tobias > > > Am 18.10.2011 um 19:34 schrieb Dante Basso: > > Hello, I have a simple question: "How to send and receive HEX > information". > The sample app only send the INTEGER VALUE of HEX information, he converts > my information in INTEGER VALUE. > > IF I SEND: "02 A3" > THE RXTX SEND THIS: "48 50 32 65 51" > > That correct? > THanks > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:03:25 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:03:25 -0200 Subject: [Rxtx] Doubt In-Reply-To: <4E9DBD0E.5060405@ergotech.com> References: <4E9DBD0E.5060405@ergotech.com> Message-ID: I'm using this code: http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port I will try modify something... On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > Dante, > > Please post some code so we can see what you are doing. > > 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" > > Which (without testing) I think you get from: > > os.write("02 A3".getBytes()) or similar > > byte[] myBytes = new byte[]{0x02, 0xA3}; > os.write (myBytes) would write the two bytes. > > Jim > > > On 10/18/2011 11:34 AM, Dante Basso wrote: > >> Hello, I have a simple question: "How to send and receive HEX >> information". >> The sample app only send the INTEGER VALUE of HEX information, he >> converts my information in INTEGER VALUE. >> >> IF I SEND: "02 A3" >> THE RXTX SEND THIS: "48 50 32 65 51" >> >> That correct? >> THanks >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > -- > Jim Redman > (505) 662 5156 x85 > http://www.ergotech.com > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcbasso at gmail.com Tue Oct 18 12:08:32 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 16:08:32 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111018185740.13450106@workstation.home> References: <20111018185740.13450106@workstation.home> Message-ID: Nice... I'm trying to code here... On Tue, Oct 18, 2011 at 3:57 PM, Andy Eskelson wrote: > You are sending ASCII characters. > > 48 = "0" > 50 = "2" > 32 = space > > etc. > > send a number, is 2 (0x02) or 163 (0xA3) > > Andy > > > > On Tue, 18 Oct 2011 15:34:51 -0200 > Dante Basso wrote: > > > Hello, I have a simple question: "How to send and receive HEX > information". > > The sample app only send the INTEGER VALUE of HEX information, he > converts > > my information in INTEGER VALUE. > > > > IF I SEND: "02 A3" > > THE RXTX SEND THIS: "48 50 32 65 51" > > > > That correct? > > THanks > > > > -- > > Dante Cesar Basso Filho > > SUPRIDATTA > > (45) 3328-0707 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From dante at supridatta.com.br Tue Oct 18 12:35:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Tue, 18 Oct 2011 16:35:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Thanks I will need to get the String like this: "02 A3 08 00 AB", and split this by " ". After I got: 02 A3 08 00 AB I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to serial port... Now I will work with the SERIAL PORT RESPONSE after I send something. Thanks! 2011/10/18 Dante Cesar Basso Filho > I'm using this code: > > http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port > > I will try modify something... > > > On Tue, Oct 18, 2011 at 3:53 PM, Jim Redman wrote: > >> Dante, >> >> Please post some code so we can see what you are doing. >> >> 48 50 32 65 51 is the ASCII string "0" "2" " " "A" "3" >> >> Which (without testing) I think you get from: >> >> os.write("02 A3".getBytes()) or similar >> >> byte[] myBytes = new byte[]{0x02, 0xA3}; >> os.write (myBytes) would write the two bytes. >> >> Jim >> >> >> On 10/18/2011 11:34 AM, Dante Basso wrote: >> >>> Hello, I have a simple question: "How to send and receive HEX >>> information". >>> The sample app only send the INTEGER VALUE of HEX information, he >>> converts my information in INTEGER VALUE. >>> >>> IF I SEND: "02 A3" >>> THE RXTX SEND THIS: "48 50 32 65 51" >>> >>> That correct? >>> THanks >>> >>> -- >>> Dante Cesar Basso Filho >>> SUPRIDATTA >>> (45) 3328-0707 >>> >>> >>> >>> ______________________________**_________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/**mailman/listinfo/rxtx >>> >> >> -- >> Jim Redman >> (505) 662 5156 x85 >> http://www.ergotech.com >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aawolfe at gmail.com Tue Oct 18 13:05:23 2011 From: aawolfe at gmail.com (Aaron Wolfe) Date: Tue, 18 Oct 2011 15:05:23 -0400 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > > 2011/10/18 Dante Cesar Basso Filho This is ridiculous. Nothing to do with RXTX at all, these are elementary level questions about some of the most basic functionality of the Java language itself, which Google can answer for you in seconds if you'd make the slightest effort. Posting questions to a public mailing list takes up a *lot* of folk's time as your question is sent into hundreds or thousands of inboxes. Please respect this resource and the people behind it. From dcbasso at gmail.com Tue Oct 18 13:20:28 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:20:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Por que nao vai se danar sua puta! ? meu primeiro contato com a ferramenta e agora entendi o funcionamento da mesma! Ent?o vai se foder FDP! On Tue, Oct 18, 2011 at 5:05 PM, Aaron Wolfe wrote: > On Tue, Oct 18, 2011 at 2:35 PM, Dante Basso > wrote: > > Thanks I will need to get the String like this: > > > > "02 A3 08 00 AB", and split this by " ". After I got: > > > > 02 > > A3 > > 08 > > 00 > > AB > > > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > > serial port... > > Now I will work with the SERIAL PORT RESPONSE after I send something. > > > > Thanks! > > > > 2011/10/18 Dante Cesar Basso Filho > > > This is ridiculous. Nothing to do with RXTX at all, these are > elementary level questions about some of the most basic functionality > of the Java language itself, which Google can answer for you in > seconds if you'd make the slightest effort. > > Posting questions to a public mailing list takes up a *lot* of folk's > time as your question is sent into hundreds or thousands of inboxes. > Please respect this resource and the people behind it. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From msemtd at googlemail.com Tue Oct 18 13:35:46 2011 From: msemtd at googlemail.com (Michael Erskine) Date: Tue, 18 Oct 2011 20:35:46 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Whoa! Where did _that_ come from? :D Calm down brother. From dcbasso at gmail.com Tue Oct 18 13:42:17 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 17:42:17 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: Agora calmo! On Tue, Oct 18, 2011 at 5:35 PM, Michael Erskine wrote: > Whoa! Where did _that_ come from? :D > > Calm down brother. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Tue Oct 18 15:36:50 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 18 Oct 2011 15:36:50 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: On Tue, 18 Oct 2011, Dante Basso wrote: > Thanks I will need to get the String like this: > > "02 A3 08 00 AB", and split this by " ". After I got: > > 02 > A3 > 08 > 00 > AB > > I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > serial port... > Now I will work with the SERIAL PORT RESPONSE after I send something. > > Thanks! > Hi Dante This must be an unusual device you are communicating with. Is this something we can read the manual for? Usually you don't send ASCII representations of hex values. -- Trent Jarvi tjarvi at qbang.org From dcbasso at gmail.com Tue Oct 18 17:49:20 2011 From: dcbasso at gmail.com (Dante Cesar Basso Filho) Date: Tue, 18 Oct 2011 21:49:20 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: It's a client hardware that I have to connect. Yes I have a manual like to develop, but all communications I have to use the HEX values... I see my client using (on linux) the CUTECOM, with some HEX like I show, I will send more examples if you want. So it's my first time using Serial Com on Projects.... On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > Thanks I will need to get the String like this: >> >> "02 A3 08 00 AB", and split this by " ". After I got: >> >> 02 >> A3 >> 08 >> 00 >> AB >> >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to >> serial port... >> Now I will work with the SERIAL PORT RESPONSE after I send something. >> >> Thanks! >> >> > Hi Dante > > This must be an unusual device you are communicating with. Is this > something we can read the manual for? > > Usually you don't send ASCII representations of hex values. > > -- > Trent Jarvi > tjarvi at qbang.org > > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -- Dante Cesar Basso Filho Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ "As pessoas s?o do tamanho dos sonhos que almejam..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at g0poy.com Tue Oct 18 19:34:40 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:34:40 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019023440.57114e9e@workstation.home> Hex is just a number base. Convert each hex pair to decimal, then send that number, job done. Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From andy at g0poy.com Tue Oct 18 19:55:25 2011 From: andy at g0poy.com (Andy Eskelson) Date: Wed, 19 Oct 2011 02:55:25 +0100 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> Message-ID: <20111019025525.3baca40e@workstation.home> A little more info... I've never touched Java, which I admit after looking about for info on simple base conversion, is a bit of a dogs breakfast trying to find the right info. I'm a microcontroller / machine code man really , and I monitor this group to pick up any problems because rxtx has been used in a software driver for an RF VNa unit I use. However 10 mins poking about with google and such like comes up with this, which seems to be what you want. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 Andy On Tue, 18 Oct 2011 21:49:20 -0200 Dante Cesar Basso Filho wrote: > It's a client hardware that I have to connect. > Yes I have a manual like to develop, but all communications I have to use > the HEX values... > I see my client using (on linux) the CUTECOM, with some HEX like I show, I > will send more examples if you want. > So it's my first time using Serial Com on Projects.... > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > Thanks I will need to get the String like this: > >> > >> "02 A3 08 00 AB", and split this by " ". After I got: > >> > >> 02 > >> A3 > >> 08 > >> 00 > >> AB > >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT to > >> serial port... > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > >> > >> Thanks! > >> > >> > > Hi Dante > > > > This must be an unusual device you are communicating with. Is this > > something we can read the manual for? > > > > Usually you don't send ASCII representations of hex values. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > > > ______________________________**_________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/**mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: http://dcbasso.blogspot.com/ > > > "As pessoas s?o do tamanho dos sonhos que almejam..." From dante at supridatta.com.br Wed Oct 19 04:49:37 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 08:49:37 -0200 Subject: [Rxtx] Doubt In-Reply-To: <20111019025525.3baca40e@workstation.home> References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I'm making this convertion the HEX String to Integer but I do this code: * String[] hex = data.split(" "); int[] array = new int[hex.length]; for( int i=0; i < hex.length ; i++ ){ array[i] = Integer.parseInt(hex[i], 16); System.out.println("ARRAY: " + Integer.parseInt(hex[i], 16)); } * I have this String on "data": *02 A3 08 00 AB* The manual only uses this kind os samples, HEX values, so I need to convert to integer and send to serial port. I think that is working good at moment, I need to resolve the problem with the return of this command. Thanks all. 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for info on > simple base conversion, is a bit of a dogs breakfast trying to find the > right info. > > I'm a microcontroller / machine code man really , and I monitor this group > to pick up any problems because rxtx has been used in a software driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up with > this, which seems to be what you want. > > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#decode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I show, > I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL THAT > to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/**mailman/listinfo/rxtx< > http://mailman.qbang.org/mailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 11:25:31 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 11:25:31 -0600 (MDT) Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: Assuming the manual is simply giving a list of bytes that need to be sent to the device seperated by spaces, the manual is telling you to send the following in Java. /* 02 A3 08 00 AB */ /* signed */ byte[] answer = { 2,-93,8,0,-85 }; I obtained the conversions using the signed char (byte) values here: http://www.binaryconvert.com/result_signed_char.html Some details you may be missing: While there are 14 characters and spaces in the manual, they probably represent 5 bytes. Integers in java are 4 bytes each. Thats not what should go on the wire. While the wire will have the correct bits if you use the above, the representation in java is signed bytes. Don't be confused with java chars which are unsigned but represent 16 bits not 8. Spaces have a byte value but they are probably not intended to be sent. Try sending the byte array above. If it works, you can work on code that converts your String to the correct byte values. On Wed, 19 Oct 2011, Dante Basso wrote: > I'm making this convertion the HEX String to Integer but I do this code: > > ?String[] hex = data.split(" "); > ??????????? int[] array = new int[hex.length]; > ??????????? for( int i=0; i < hex.length ; i++ ){ > ??????????????? array[i] = Integer.parseInt(hex[i], 16); > ??????????????? System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > ??????????? } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#dec > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > ?Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. ?Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ______________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**mailman/listinfo/rxtx ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > From dante at supridatta.com.br Wed Oct 19 13:31:28 2011 From: dante at supridatta.com.br (Dante Basso) Date: Wed, 19 Oct 2011 17:31:28 -0200 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: I have use this an Apache resource: http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html this helps me a lot... the conversion is working very fast, easy, clean code and safe. * the spaces I don't send. 2011/10/19 Trent Jarvi > > Assuming the manual is simply giving a list of bytes that need to be sent > to the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/**result_signed_char.html > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: >> >> String[] hex = data.split(" "); >> int[] array = new int[hex.length]; >> for( int i=0; i < hex.length ; i++ ){ >> array[i] = Integer.parseInt(hex[i], 16); >> System.out.println("ARRAY: " + Integer.parseInt(hex[i], >> 16)); >> } >> >> I have this String on "data": 02 A3 08 00 AB >> The manual only uses this kind os samples, HEX values, so I need to >> convert >> to integer and send to serial port. I think that is working good at >> moment, >> I need to resolve the problem with the return of this command. >> >> Thanks all. >> >> >> 2011/10/18 Andy Eskelson >> >> A little more info... >> >> I've never touched Java, which I admit after looking about for >> info on >> simple base conversion, is a bit of a dogs breakfast trying to >> find the >> right info. >> >> I'm a microcontroller / machine code man really , and I monitor >> this group >> to pick up any problems because rxtx has been used in a software >> driver >> for an RF VNa unit I use. >> >> However 10 mins poking about with google and such like comes up >> with >> this, which seems to be what you want. >> >> http://download.oracle.com/**javase/1.4.2/docs/api/java/** >> lang/Integer.html#dec >> ode%28java.lang.String%29 >> >> >> >> Andy >> >> >> >> On Tue, 18 Oct 2011 21:49:20 -0200 >> Dante Cesar Basso Filho wrote: >> >> > It's a client hardware that I have to connect. >> > Yes I have a manual like to develop, but all communications I have >> to use >> > the HEX values... >> > I see my client using (on linux) the CUTECOM, with some HEX like I >> show, I >> > will send more examples if you want. >> > So it's my first time using Serial Com on Projects.... >> > >> > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi >> wrote: >> > >> > > >> > > >> > > On Tue, 18 Oct 2011, Dante Basso wrote: >> > > >> > > Thanks I will need to get the String like this: >> > >> >> > >> "02 A3 08 00 AB", and split this by " ". After I got: >> > >> >> > >> 02 >> > >> A3 >> > >> 08 >> > >> 00 >> > >> AB >> > >> >> > >> I will make a convertion to INTEGER VALUE and after that SEND ALL >> THAT to >> > >> serial port... >> > >> Now I will work with the SERIAL PORT RESPONSE after I send >> something. >> > >> >> > >> Thanks! >> > >> >> > >> >> > > Hi Dante >> > > >> > > This must be an unusual device you are communicating with. Is >> this >> > > something we can read the manual for? >> > > >> > > Usually you don't send ASCII representations of hex values. >> > > >> > > -- >> > > Trent Jarvi >> > > tjarvi at qbang.org >> > > >> > > ______________________________****_________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > >http://mailman.qbang.org/****mailman/listinfo/rxtx >> >> ailman/listinfo/rxtx> >> > > >> > >> > >> > >> > -- >> > Dante Cesar Basso Filho >> > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: >> http://dcbasso.blogspot.com/ >> > >> > >> > "As pessoas s?o do tamanho dos sonhos que almejam..." >> >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> >> -- >> Dante Cesar Basso Filho >> SUPRIDATTA >> (45) 3328-0707 >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -- Dante Cesar Basso Filho SUPRIDATTA (45) 3328-0707 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gergg at cox.net Wed Oct 19 14:04:58 2011 From: gergg at cox.net (Gregg Wonderly) Date: Wed, 19 Oct 2011 15:04:58 -0500 Subject: [Rxtx] Doubt In-Reply-To: References: <4E9DBD0E.5060405@ergotech.com> <20111019025525.3baca40e@workstation.home> Message-ID: <4E9F2D6A.8060700@cox.net> What I do to manage the sending of bytes, when I have sequences that I know about in Java, is to do the following with packets of known content. byte[]data = { 0x02, (byte)0xa3, 0x08, 0x00, (byte)0xab }; The (byte) cast is necessary on any value that has a value of 128 or larger. Then, you can just do out.write( data ); and be done with it. If you have to compose packets from other values, then you might have an int value in a variable, and you just need to use the (byte) cast on that to make Java accept the fact that you know what you are doing. Finally, when you read values into a byte array, and then need to take them out and act on them, the "sign" on the byte values, will cause the byte values of 0x80 and larger to be sign extended to fit into larger int values such as short, int or long, so 0x80 becomes 0xff80 or 0xffffff80 or 0xffffffffffffff80, which is not what you usually want. So, just use a bit-wise AND operation with 0xff to keep that from happening as in. static int _OPERATION_1 0xA0 static int _OPERATION_2 0xA1 static int _OPERATION_3 0xA2 byte[]data = new byte[PACKET_SIZE]; in.read( data ); switch( data[3] & 0xff ) { // truncate to 8-bits case _OPERATION_1: ... break; case _OPERATION_2: ... break; case _OPERATION_3: ... break; } These are the basics of dealing with bytes in Java. The fact that they are signed, and sign extension occurs, makes all this necessary. Gregg Wonderly On 10/19/2011 2:31 PM, Dante Basso wrote: > I have use this an Apache resource: > > http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html > > this helps me a lot... the conversion is working very fast, easy, clean code and > safe. > * the spaces I don't send. > > > 2011/10/19 Trent Jarvi > > > > Assuming the manual is simply giving a list of bytes that need to be sent to > the device seperated by spaces, the manual is telling you to send the > following in Java. > > /* 02 A3 08 00 AB */ > /* signed */ byte[] answer = { 2,-93,8,0,-85 }; > > I obtained the conversions using the signed char (byte) values here: > > http://www.binaryconvert.com/__result_signed_char.html > > > > Some details you may be missing: > > While there are 14 characters and spaces in the manual, they > probably represent 5 bytes. > > Integers in java are 4 bytes each. Thats not what should go on the > wire. > > While the wire will have the correct bits if you use the above, the > representation in java is signed bytes. Don't be confused with java > chars which are unsigned but represent 16 bits not 8. > > Spaces have a byte value but they are probably not intended to be sent. > > Try sending the byte array above. If it works, you can work on code that > converts your String to the correct byte values. > > > > On Wed, 19 Oct 2011, Dante Basso wrote: > > I'm making this convertion the HEX String to Integer but I do this code: > > String[] hex = data.split(" "); > int[] array = new int[hex.length]; > for( int i=0; i < hex.length ; i++ ){ > array[i] = Integer.parseInt(hex[i], 16); > System.out.println("ARRAY: " + Integer.parseInt(hex[i], > 16)); > } > > I have this String on "data": 02 A3 08 00 AB > The manual only uses this kind os samples, HEX values, so I need to convert > to integer and send to serial port. I think that is working good at moment, > I need to resolve the problem with the return of this command. > > Thanks all. > > > 2011/10/18 Andy Eskelson > > > A little more info... > > I've never touched Java, which I admit after looking about for > info on > simple base conversion, is a bit of a dogs breakfast trying to > find the > right info. > > I'm a microcontroller / machine code man really , and I monitor > this group > to pick up any problems because rxtx has been used in a software > driver > for an RF VNa unit I use. > > However 10 mins poking about with google and such like comes up > with > this, which seems to be what you want. > > http://download.oracle.com/__javase/1.4.2/docs/api/java/__lang/Integer.html#dec > > ode%28java.lang.String%29 > > > > Andy > > > > On Tue, 18 Oct 2011 21:49:20 -0200 > Dante Cesar Basso Filho > > wrote: > > > It's a client hardware that I have to connect. > > Yes I have a manual like to develop, but all communications I have > to use > > the HEX values... > > I see my client using (on linux) the CUTECOM, with some HEX like I > show, I > > will send more examples if you want. > > So it's my first time using Serial Com on Projects.... > > > > On Tue, Oct 18, 2011 at 7:36 PM, Trent Jarvi > > wrote: > > > > > > > > > > > On Tue, 18 Oct 2011, Dante Basso wrote: > > > > > > Thanks I will need to get the String like this: > > >> > > >> "02 A3 08 00 AB", and split this by " ". After I got: > > >> > > >> 02 > > >> A3 > > >> 08 > > >> 00 > > >> AB > > >> > > >> I will make a convertion to INTEGER VALUE and after that SEND ALL > THAT to > > >> serial port... > > >> Now I will work with the SERIAL PORT RESPONSE after I send > something. > > >> > > >> Thanks! > > >> > > >> > > > Hi Dante > > > > > > This must be an unusual device you are communicating with. Is > this > > > something we can read the manual for? > > > > > > Usually you don't send ASCII representations of hex values. > > > > > > -- > > > Trent Jarvi > > > tjarvi at qbang.org > > > > > > ________________________________**_________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > >http://mailman.qbang.org/**__mailman/listinfo/rxtx > > ailman/listinfo/rxtx> > > > > > > > > > > > -- > > Dante Cesar Basso Filho > > Twiiter: @DanteBasso - PSN/PS3: dcbasso - Blog: > http://dcbasso.blogspot.com/ > > > > > > "As pessoas s?o do tamanho dos sonhos que almejam..." > > _________________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/__mailman/listinfo/rxtx > > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > -- > Dante Cesar Basso Filho > SUPRIDATTA > (45) 3328-0707 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From energijapanikoj at gmail.com Wed Oct 19 15:46:57 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 00:46:57 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 Message-ID: Hi all, i'm having trouble not passing loopback test ( http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) using rxtx and purejavacomm. loopback itself works - i can see chars echoed on CoolTerm i'm using usb to rs232 dongle that is based on prolific chip does anyone have any suggestions how do i debug the situation? When investigating i noticed that data available event is never fired, except when i leave one test program hanging waiting for input ant start another copy of test program - then both of them sometimes get some input, otherwise - no input. On another occasion - when i open port and try echoing chars in terminal app and close port - sometimes test works. Any suggestions? Works OK on the windows though... -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 19 18:04:11 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 19 Oct 2011 18:04:11 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: On Thu, 20 Oct 2011, maumertas maumertas wrote: > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific chip > > does anyone have any suggestions how do i debug the situation? > > When investigating i noticed that data available event is never fired, > except when i leave one test program hanging waiting for input ant start > another copy of test program - then both of them sometimes get some input, > otherwise - no input. On another occasion - when i open port and try echoing > chars in terminal app and close port - sometimes test works. > > Any suggestions? > > Works OK on the windows though... > > My guess is that you have an application listening to the port while trying to test with the second. Only one application can receive the data. The data available events will work if data becomes available to the application. If you do a bunch of work in the event handler, it is possible that you will receive fewer events but you should still receive events. running fuser /dev/ttyS0 will tell you who is using the serial port if another application is running. -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 19 20:59:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 19 Oct 2011 21:59:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Wed Oct 19 21:36:10 2011 From: showard314 at gmail.com (Scott Howard) Date: Wed, 19 Oct 2011 23:36:10 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Wed, Oct 19, 2011 at 10:59 PM, Yueng De La Hoz wrote: > Hi everyone > > I am trying to recompile the rxtx source code so it recognizes the rfcomm > port but whenever I enter "make" I've got the following error: > > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: error: > 'UTS_RELEASE' undeclared (first use in this function) > /home/delahoz/Downloads/rxtx-2.2pre2/./src/I2CImp.c:135:5: note: each > undeclared identifier is reported only once for each function it appears in > libtool: link: > `/home/delahoz/Downloads/rxtx-2.2pre2/x86_64-unknown-linux-gnu/I2CImp.lo' is > not a valid libtool object > make: *** [x86_64-unknown-linux-gnu/librxtxI2C.la] Error 1 > -- It's a known problem that's been around for a while [1]. Patch [2] and explanation [3] are available. I actually don't remember why it isn't fixed yet... [1] http://mailman.qbang.org/2010-July/6692066.html [2] http://anonscm.debian.org/gitweb/?p=pkg-java/rxtx.git;a=blob_plain;f=debian/patches/original_debian_changes.patch;h=58424d3bdfdbfc185b58edb7471d04568563f861;hb=HEAD [3] http://mailman.qbang.org/2010-July/6692073.html From energijapanikoj at gmail.com Thu Oct 20 00:33:47 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 09:33:47 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm now suspecting combination of Prolific drivers for Mac OS and rxtx/purejavacomm. I'm sure no other application is using the port and the only time it somehow works is after using terminal app and closing the port. As purejavacomm does not lock the port, i'm able to receive some bytes when running a couple of instances of test simultaneously. On another hand - if i perform a loopback test on my arduino uno, which manifests itself as cdc device (not ftdi one) - it works perfectly This is why i suspect prolific driver. But on another hand - bunch of people on this list are using prolific devices and the device itself echoes back in terminal app, just java is not working. Could i get a version of rxtx with more verbose debug output to investigate? On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific chip >> >> does anyone have any suggestions how do i debug the situation? >> >> When investigating i noticed that data available event is never fired, >> except when i leave one test program hanging waiting for input ant start >> another copy of test program - then both of them sometimes get some input, >> otherwise - no input. On another occasion - when i open port and try >> echoing >> chars in terminal app and close port - sometimes test works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> > My guess is that you have an application listening to the port while trying > to test with the second. Only one application can receive the data. > > The data available events will work if data becomes available to the > application. If you do a bunch of work in the event handler, it is possible > that you will receive fewer events but you should still receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > ______________________________**_________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/**mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Thu Oct 20 03:44:59 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 20 Oct 2011 03:44:59 -0600 (MDT) Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: Prolific is usually fairly good in my experience. If you have a fairly recent version of Mac OS X, you may try downloading the prolific driver to see if they have reacted to changes in OS X. http://www.prolific.com.tw/eng/downloads.asp?ID=31 The eventLoop in rxtx is the location data available events start in rxtx native code. There isn't going to be specific debug code to help you there that can be put in the event handling code of a test application. On Thu, 20 Oct 2011, maumertas maumertas wrote: > I'm now suspecting combination of Prolific drivers for Mac OS and > rxtx/purejavacomm. > > I'm sure no other application is using the port and the only time it somehow > works is after using terminal app and closing the port. As purejavacomm does > not lock the port, i'm able to receive some bytes when running a couple of > instances of test simultaneously. > > On another hand - if i perform a loopback test on my arduino uno, which > manifests itself as cdc device (not ftdi one) - it works perfectly > > This is why i suspect prolific driver. But on another hand - bunch of people > on this list are using prolific devices and the device itself echoes back in > terminal app, just java is not working. > > Could i get a version of rxtx with more verbose debug output to investigate? > > On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > Hi all, > > i'm having trouble not passing loopback test > (http://embeddedfreak.wordpress.com/2008/08/29/rxtx-loopback-program2/) > using rxtx and purejavacomm. > loopback itself works - i can see chars echoed on CoolTerm > i'm using usb to rs232 dongle that is based on prolific > chip > > does anyone have any suggestions how do i debug the > situation? > > When investigating i noticed that data available event is > never fired, > except when i leave one test program hanging waiting for > input ant start > another copy of test program - then both of them sometimes > get some input, > otherwise - no input. On another occasion - when i open > port and try echoing > chars in terminal app and close port - sometimes test > works. > > Any suggestions? > > Works OK on the windows though... > > > > My guess is that you have an application listening to the port while > trying to test with the second. ?Only one application can receive the > data. > > The data available events will work if data becomes available to the > application. ?If you do a bunch of work in the event handler, it is > possible that you will receive fewer events but you should still > receive events. > > > running fuser /dev/ttyS0 will tell you who is using the serial port if > another application is running. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From energijapanikoj at gmail.com Thu Oct 20 06:28:29 2011 From: energijapanikoj at gmail.com (maumertas maumertas) Date: Thu, 20 Oct 2011 15:28:29 +0300 Subject: [Rxtx] Not passing loop-back test on Mac OS X 10.5.8 In-Reply-To: References: Message-ID: I'm using rather old version of Prolific driver - 1.2.1r2 as it's one suitable for my Mac OS version (10.5.8) i'll try running a test on Mac OS 10.6.x with newer Prolific driver and will let you know. On Thu, Oct 20, 2011 at 12:44 PM, Trent Jarvi wrote: > > Prolific is usually fairly good in my experience. If you have a fairly > recent version of Mac OS X, you may try downloading the prolific driver to > see if they have reacted to changes in OS X. > > http://www.prolific.com.tw/**eng/downloads.asp?ID=31 > > The eventLoop in rxtx is the location data available events start in rxtx > native code. There isn't going to be specific debug code to help you there > that can be put in the event handling code of a test application. > > > On Thu, 20 Oct 2011, maumertas maumertas wrote: > > I'm now suspecting combination of Prolific drivers for Mac OS and >> rxtx/purejavacomm. >> >> I'm sure no other application is using the port and the only time it >> somehow >> works is after using terminal app and closing the port. As purejavacomm >> does >> not lock the port, i'm able to receive some bytes when running a couple of >> instances of test simultaneously. >> >> On another hand - if i perform a loopback test on my arduino uno, which >> manifests itself as cdc device (not ftdi one) - it works perfectly >> >> This is why i suspect prolific driver. But on another hand - bunch of >> people >> on this list are using prolific devices and the device itself echoes back >> in >> terminal app, just java is not working. >> >> Could i get a version of rxtx with more verbose debug output to >> investigate? >> >> On Thu, Oct 20, 2011 at 3:04 AM, Trent Jarvi wrote: >> >> >> On Thu, 20 Oct 2011, maumertas maumertas wrote: >> >> Hi all, >> >> i'm having trouble not passing loopback test >> (http://embeddedfreak.**wordpress.com/2008/08/29/rxtx-** >> loopback-program2/ >> ) >> using rxtx and purejavacomm. >> loopback itself works - i can see chars echoed on CoolTerm >> i'm using usb to rs232 dongle that is based on prolific >> chip >> >> does anyone have any suggestions how do i debug the >> situation? >> >> When investigating i noticed that data available event is >> never fired, >> except when i leave one test program hanging waiting for >> input ant start >> another copy of test program - then both of them sometimes >> get some input, >> otherwise - no input. On another occasion - when i open >> port and try echoing >> chars in terminal app and close port - sometimes test >> works. >> >> Any suggestions? >> >> Works OK on the windows though... >> >> >> >> My guess is that you have an application listening to the port while >> trying to test with the second. Only one application can receive the >> data. >> >> The data available events will work if data becomes available to the >> application. If you do a bunch of work in the event handler, it is >> possible that you will receive fewer events but you should still >> receive events. >> >> >> running fuser /dev/ttyS0 will tell you who is using the serial port if >> another application is running. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> ______________________________**_________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/**mailman/listinfo/rxtx >> >> >> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Thu Oct 20 17:53:43 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 18:53:43 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From showard314 at gmail.com Thu Oct 20 21:27:02 2011 From: showard314 at gmail.com (Scott Howard) Date: Thu, 20 Oct 2011 23:27:02 -0400 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: On Thu, Oct 20, 2011 at 7:53 PM, Yueng De La Hoz wrote: > Hi > > That patch seems to be for a debian based distro. I am running a fedora > based distro (Lovelock - 64 bits), can you tell me how I can apply the patch > in this distro. The patch is distro independent. You probably want to manually delete the section corresponding to: Index: rxtx/Makefile.in since it doesn't relate to this problem, but another. All the patch does is comment out everywhere UTS_RELEASE is called, so it really doesn't matter which distro you use. Cheers, Scott From yuengdelahoz at hotmail.com Thu Oct 20 21:58:13 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Thu, 20 Oct 2011 22:58:13 -0500 Subject: [Rxtx] rxtx and rfcomm : compiling issue In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From ddevecchio at celestron.com Fri Oct 21 03:40:15 2011 From: ddevecchio at celestron.com (DERIK DEVECCHIO) Date: Fri, 21 Oct 2011 02:40:15 -0700 Subject: [Rxtx] PureJavaComm contribution Message-ID: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Kusti, I decided to give PureJavaComm a run in my application. Thank you again for doing all this work and making it available. I download the May 27 distribution from https://github.com/nyholku/purejavacomm Things are mostly working now. I did some speed tests at 115200, and to within the uncertainty of my measurement it is every bit as fast RXTX. I will start testing with different USB adapters and different systems next week. I had to make a few fixes to CommPortIdentifier in order to make things work for my application. Your website makes it sound like you might not be interested in taking contributions to this effort. However, since they will probably be useful for others, I list them here. Line 116: String owner = m_Owners.get(m_PortName); // original String owner = m_Owners.get(this); Without this change, the conditional in line 117 will never be true and the owner of the thread will never be notified and thereby be given the chance to yield the comm port by closing it. Line 149: m_Owners.remove(port.name); // original m_Owners.clear(); Without this change, if a client closes a comm port, then the appName submitted by the client when he opened the port is not correctly removed from the owners list. In that case it is impossible for the client to re-open the port without re-enumerating everything via getPortIdentifiers(). Since you created m_Owners as a HashTable, I would have preferred to remove() just one element from the table. But the static context in which m_Owners is accessed can't possibly know the correct instance of CommPortIdentifier. And in any case, the open() function ensures that there never be more than one element in the table so clear() is functionally equivalent to remove() in this case. For that matter, you could replace the entire HashTable with a single string! The change I have suggested here is the minimal change necessary to make it work for me. Line 224: m_OwnerShipListeners.remove(list); // original m_OwnerShipListeners.remove(this); The original tries to remove an element of the HashTable using the Value and not the Key. Even though this will always fail to remove anything, it causes no break to the contract with the client. That is, even though the original will fail to remove the element whose {Key,Value} = {this,list}, the client can not know this. The only possible harm done is that the list will not be available for garbage collection until the enclosing CommPortIdentifier is disposed instead of as soon as it is empty. No error will occur if someone attempts to remove form the empty list. And someone adding a new element, would find themselves added to the pre-existing list instead of requiring CommPortIdentifier to instantiate another list. From Kustaa.Nyholm at planmeca.com Fri Oct 21 06:10:11 2011 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 21 Oct 2011 15:10:11 +0300 Subject: [Rxtx] PureJavaComm contribution In-Reply-To: <9FAD7E5EBDD14B4981E81E66FA62E5C704F73BDBCA@nubula-vm2> Message-ID: On 10/21/11 12:40, "DERIK DEVECCHIO" wrote: >Kusti, > >I decided to give PureJavaComm a run in my application. Thank you again >for doing all this work and making it available. > >I download the May 27 distribution from >https://github.com/nyholku/purejavacomm > >Things are mostly working now. I did some speed tests at 115200, and to >within the uncertainty of my measurement it is every bit as fast RXTX. I >will start testing with different USB adapters and different systems next >week. > >I had to make a few fixes to CommPortIdentifier in order to make things >work for my application. Your website makes it sound like you might not >be interested in taking contributions to this effort. However, since >they will probably be useful for others, I list them here. Thanks for the contribution I will incorporate them when I have time to do that. I'm not against contribution, on the contrary, I just said that I was not trying to actively look for contributions, as my mine motivation was just to satisfy myself, but since I thought it might be useful for other I decided to release it and it is nice to know that people are using and improving it. br Kusti PS Looked through your contributions and the seem to make sense. From yuengdelahoz at hotmail.com Fri Oct 21 14:37:19 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 15:37:19 -0500 Subject: [Rxtx] rxtx and rfcomm Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Fri Oct 21 14:04:51 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 21 Oct 2011 14:04:51 -0600 (MDT) Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > Hi everyone > > I have recompile the source code and made sure "rfcomm" was included in the > 'src/RXTXCommDriver.java' file. However, whenever I run the following code I > get an exception. > Can you please tell me what it's wrong with the code. Also, help me out with > the portIdentifier.open method, I don't know what to put in the owner beside > of what I've put. > > import gnu.io.CommPort; > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.UnsupportedCommOperationException; > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? public static void main(String[] args) { > > ??? ??? try { > ??? ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > ??? ??? if (portIdentifier.isCurrentlyOwned()) { > ??? ??? ??? System.out.println("Error: The port's been used by another > application"); > ??? ??? } else { > ??? ??? ??? > ??? ??? ??? try { > ??? ??? ??? ??? commPort > =portIdentifier.open(portIdentifier.getCurrentOwner(), 2000); > ??? ??? ??? ??? System.out.println(commPort); > ??? ??? ??? } catch (PortInUseException e) { > ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? } > ??? ??? ??? > ??? ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? ??? SerialPort serialPort = (SerialPort) commPort; > ??? ??? ??? ??? try { > ??? ??? ??? ??? ??? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??? ??? ??? ??? } catch (UnsupportedCommOperationException e) { > ??? ??? ??? ??? ??? e.printStackTrace(); > ??? ??? ??? ??? }??? ??? ??? ??? > ??? ??? ??? } else { > ??? ??? ??? ??? System.out.println("Error: Only serial ports are being > managed by this example."); > ??? ??? ??? } > ??? ??? } > > ??? } > > } > > This is the exception output: > > RXTX Warning:? Removing stale lock file. /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 12018 Program = java > Error: Only serial ports are being managed by this example. > > ??? at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.main(rfcomm.java:24) > > > Hi Yueng, Open() failed because the port is already in use. This can happen while going through edit/compile/run cycles if you forget a run is still active. Process 12018 is still running and has that port open. It's probably another instance of your program (perhaps in a different terminal). If you are the only one using that port, you can kill the forgotten program: kill -9 12018 -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Fri Oct 21 15:53:39 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 16:53:39 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 21:59:22 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 22:59:22 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From yuengdelahoz at hotmail.com Fri Oct 21 22:46:51 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Fri, 21 Oct 2011 23:46:51 -0500 Subject: [Rxtx] rxtx and rfcomm In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Sat Oct 22 11:29:25 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 22 Oct 2011 11:29:25 -0600 (MDT) Subject: [Rxtx] [SPAM] Re: rxtx and rfcomm In-Reply-To: References: Message-ID: You need to close the port in your code (rfcomm). For instance, the exception below is resulting in your program exiting. You need to close the port in the catch for that exception prior to exiting. I don't think the parameters can be set for the rfcomm device. This is bluetooth I presume. Serial port parameters don't make a great deal of sense to the underlying bluetooth radio. This is line 211 in RXTXPort.java. On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > How do I close the port within eclipse?. I removed the > /var/lock/LCK...rfcomm0 file manually and now I am getting the same error as > before and this new one. following error: > > gnu.io.UnsupportedCommOperationException: Invalid Parameter > ??? at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:211) > ??? at rfcomm.connect(rfcomm.java:25) > ??? at rfcomm.main(rfcomm.java:36) > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 08:01 PM, Trent Jarvi wrote: > > Ah, Eclipse.? So its always running in the same process > presumably.? Well, your code needs to close the port to release > the lock file.? You can delete the lock file manually > > ????rm -f /var/lock/lck..rfcomm2 (assuming I got the filename > right) > > Deleting the lockfile allows you to open the com port with a new > application.? closing the port in your application also deletes > the lock file... > > What happens is you create a lockfile the first time you open > the file and when your program 'exits' eclipse is still running > in the same java process.? So the file exists and the PID is > valid.? Thats my guess at least.? When you run the application > again, the lockfile is there and is valid (if it wasnt valid, > the lockfile would be deleted instead of throwing an exception). > > On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > Hello > > I always run the program from eclipse with my user > account "delahoz". I have > modified the code as per your suggestion. But I am > still having problems: > > > public class rfcomm { > > ??? static CommPort commPort; > ??? static CommPortIdentifier portIdentifier; > > ??? void connect() throws Exception { > > ??? ??? portIdentifier = > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > > ??? ??? commPort = > portIdentifier.open(this.getClass().getName(),2000); > > ??? ??? if (commPort instanceof SerialPort) { > ??? ??? ??? SerialPort serialPort = (SerialPort) > commPort; > ??? ??? ??? serialPort.setSerialPortParams(19200, > SerialPort.DATABITS_8,SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > > ??? ??? } else { > ??? ??? ??? System.out.println("\nError: Only serial > ports are being managed > by this example."); > ??? ??? } > ??? } > > ??? public static void main(String[] args) { > ??? ??? > ??? ??? try { > ??? ??? ??? new rfcomm().connect(); > ??? ??? } catch (Exception e) { > ??? ??? ??? e.printStackTrace(); > ??? ??? } > > ??? } > > } > --------------------------------------------------------------------------- > > ---- > Console Output: > RXTX Warning:? Removing stale lock file. > /var/lock/LCK..rfcomm0 > gnu.io.PortInUseException:? delahoz PID =? 18377 > Program = java > ??? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??? at rfcomm.connect(rfcomm.java:19) > ??? at rfcomm.main(rfcomm.java:34) > > Every time I run the program I get a different PID. > > > Best regards, > --------------------------------------------------- > > Yueng De La Hoz > Telecom Consultant > Email: yuengdelahoz at hotmail.com > IM: yuengdelahoz at hotmail.com > Phone 1 : 57 300 7555091 > Phone 2 : 57 5 3627166 > > > On 10/21/2011 03:20 PM, Trent Jarvi wrote: > > ????? Maybe you ran the program as root and are now > a user? > > ????? fuser /var/lock/lck..rfcomm0 > ????? ps aux | grep pid > > ????? The 'isCurrentlyOwned' is a java thing.? The > exception is coming > ????? from the system lock file.? RXTX doesnt > actually support the > ????? 'isCurrentlyOwned' mechanism which is for java > applications to > ????? share a port. > > ????? So I'd get rid of the currently owned logic as > its actually a > ????? bit confusing with respect to the exception > handling you are > ????? doing. > > ????? On Fri, 21 Oct 2011, Yueng De La Hoz wrote: > > ??????????? The problem is whenever I search for the > pid I find > ??????????? nothing. I have tried to > ??????????? kill it just like you explained below > but nothing > ??????????? happens. > > ??????????? Best regards, > ??????????? > --------------------------------------------------- > > ??????????? Yueng De La Hoz > ??????????? Telecom Consultant > ??????????? Email: yuengdelahoz at hotmail.com > ??????????? IM: yuengdelahoz at hotmail.com > ??????????? Phone 1 : 57 300 7555091 > ??????????? Phone 2 : 57 5 3627166 > > > ??????????? On 10/21/2011 03:04 PM, Trent Jarvi > wrote: > > > ??????????? ????? On Fri, 21 Oct 2011, Yueng De La > Hoz wrote: > > ??????????? ??????????? Hi everyone > > ??????????? ??????????? I have recompile the source > code and > ??????????? made sure > ??????????? ??????????? "rfcomm" was included in the > ??????????? ??????????? 'src/RXTXCommDriver.java' > file. However, > ??????????? whenever I > ??????????? ??????????? run the following code I > ??????????? ??????????? get an exception. > ??????????? ??????????? Can you please tell me what > it's wrong > ??????????? with the > ??????????? ??????????? code. Also, help me out with > ??????????? ??????????? the portIdentifier.open > method, I don't > ??????????? know what to > ??????????? ??????????? put in the owner beside > ??????????? ??????????? of what I've put. > > ??????????? ??????????? import gnu.io.CommPort; > ??????????? ??????????? import > gnu.io.CommPortIdentifier; > ??????????? ??????????? import > gnu.io.PortInUseException; > ??????????? ??????????? import gnu.io.SerialPort; > ??????????? ??????????? import > ??????????? > gnu.io.UnsupportedCommOperationException; > > ??????????? ??????????? public class rfcomm { > > ??????????? ??????????? ??? static CommPort > commPort; > ??????????? ??????????? ??? static > CommPortIdentifier > ??????????? portIdentifier; > > ??????????? ??????????? ??? public static void > main(String[] > ??????????? args) { > > ??????????? ??????????? ??? ??? try { > ??????????? ??????????? ??? ??? ??? portIdentifier = > ??????????? ??????????? > ??????????? > CommPortIdentifier.getPortIdentifier("/dev/rfcomm0"); > ??????????? ??????????? ??? ??? } catch (Exception > e) { > ??????????? ??????????? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? } > ??????????? ??????????? ??? ??? if > ??????????? (portIdentifier.isCurrentlyOwned()) { > ??????????? ??????????? ??? ??? ??? > System.out.println("Error: > ??????????? The port's > ??????????? ??????????? been used by another > ??????????? ??????????? application"); > ??????????? ??????????? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? commPort > ??????????? ??????????? > ??????????? > =portIdentifier.open(portIdentifier.getCurrentOwner(), > ??????????? ??????????? 2000); > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println(commPort); > ??????????? ??????????? ??? ??? ??? } catch > (PortInUseException > ??????????? e) { > ??????????? ??????????? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? ??? > ??????????? ??????????? ??? ??? ??? if (commPort > instanceof > ??????????? SerialPort) { > ??????????? ??????????? ??? ??? ??? ??? SerialPort > serialPort = > ??????????? (SerialPort) > ??????????? ??????????? commPort; > ??????????? ??????????? ??? ??? ??? ??? try { > ??????????? ??????????? ??? ??? ??? ??? ??? > ??????????? ??????????? > ??????????? > serialPort.setSerialPortParams(19200,SerialPort.DATABITS_8, > ??????????? ??????????? > ??????????? > SerialPort.STOPBITS_1,SerialPort.PARITY_NONE); > ??????????? ??????????? ??? ??? ??? ??? } catch > ??????????? ??????????? > (UnsupportedCommOperationException e) { > ??????????? ??????????? ??? ??? ??? ??? ??? > e.printStackTrace(); > ??????????? ??????????? ??? ??? ??? ??? }??? ??? ??? > ??? > ??????????? ??????????? ??? ??? ??? } else { > ??????????? ??????????? ??? ??? ??? ??? > ??????????? System.out.println("Error: Only > ??????????? ??????????? serial ports are being > ??????????? ??????????? managed by this example."); > ??????????? ??????????? ??? ??? ??? } > ??????????? ??????????? ??? ??? } > > ??????????? ??????????? ??? } > > ??????????? ??????????? } > > ??????????? ??????????? This is the exception > output: > > ??????????? ??????????? RXTX Warning:? Removing > stale lock file. > ??????????? ??????????? /var/lock/LCK..rfcomm0 > ??????????? ??????????? gnu.io.PortInUseException:? > delahoz PID > ??????????? =? 12018 > ??????????? ??????????? Program = java > ??????????? ??????????? Error: Only serial ports are > being > ??????????? managed by this > ??????????? ??????????? example. > > ??????????? ??????????? ??? at > ??????????? ??????????? > ??????????? > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467) > ??????????? ??????????? ??? at > rfcomm.main(rfcomm.java:24) > > > > > ??????????? ????? Hi Yueng, > > ??????????? ????? Open() failed because the port is > already in > ??????????? use.? This can > ??????????? ????? happen while going through > edit/compile/run > ??????????? cycles if you forget > ??????????? ????? a run is still active. > > ??????????? ????? Process 12018 is still running and > has that > ??????????? port open.? It's > ??????????? ????? probably another instance of your > program > ??????????? (perhaps in a > ??????????? ????? different terminal).? If you are > the only one > ??????????? using that port, > ??????????? ????? you can kill the forgotten > program: > > ??????????? ????? kill -9 12018 > > ??????????? ????? -- > ??????????? ????? Trent Jarvi > ??????????? ????? tjarvi at qbang.org > > > > > > > From craig.raffel at gmail.com Wed Oct 26 10:23:44 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 12:23:44 -0400 Subject: [Rxtx] RXTX Development Message-ID: I don't want to be rude but is RXTX 2.2 still being actively developed? I do not have the ability to grab the source at work and aside from checking the dates on some wiki edits I have not seen any "news". Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjarvi at qbang.org Wed Oct 26 10:00:13 2011 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 26 Oct 2011 10:00:13 -0600 (MDT) Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: On Wed, 26 Oct 2011, Craig Raffel wrote: > I don't want to be rude but is RXTX 2.2 still being actively developed? I do > not have the ability to grab the source at work and aside from checking the > dates on some wiki edits I have not seen any "news". > Hi Craig, We need to push out another version of the source code shortly to address bugs but there isn't a great deal of need for development at this time from those using it. The parallel port users have fairly simple needs and are not itching to add more capability. The Serial port users have a few bug fixes on the mail-list. RS485/RS422 use the serial interface as far as I have seen which is what I did as well. What is missing for your use case? -- Trent Jarvi tjarvi at qbang.org From yuengdelahoz at hotmail.com Wed Oct 26 11:50:18 2011 From: yuengdelahoz at hotmail.com (Yueng De La Hoz) Date: Wed, 26 Oct 2011 12:50:18 -0500 Subject: [Rxtx] rfcomm and java_ Message-ID: An HTML attachment was scrubbed... URL: From jfh at greenhousepc.com Wed Oct 26 12:40:38 2011 From: jfh at greenhousepc.com (jfh at greenhousepc.com) Date: Wed, 26 Oct 2011 11:40:38 -0700 Subject: [Rxtx] RXTX Development Message-ID: <20111026114038.8ef0e5b4a80cef441275a6330ffad77d.771b71ac12.wbe@email13.secureserver.net> An HTML attachment was scrubbed... URL: From Cougar at CasaDelGato.Com Wed Oct 26 12:50:03 2011 From: Cougar at CasaDelGato.Com (John G. Lussmyer) Date: Wed, 26 Oct 2011 11:50:03 -0700 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: <4EA8565B.2050207@CasaDelGato.Com> On 10/26/2011 9:00 AM, Trent Jarvi wrote: > > We need to push out another version of the source code shortly to > address bugs but there isn't a great deal of need for development at > this time from those using it. > > The parallel port users have fairly simple needs and are not itching > to add more capability. > > The Serial port users have a few bug fixes on the mail-list. > RS485/RS422 use the serial interface as far as I have seen which is > what I did as well. > > What is missing for your use case? Maybe he is like me, and needs a full set of compiled binaries WITH the latest bug fixes. I simple do not have the equipment to build all the possible binaries to distribute with my app. From craig.raffel at gmail.com Wed Oct 26 13:06:16 2011 From: craig.raffel at gmail.com (Craig Raffel) Date: Wed, 26 Oct 2011 15:06:16 -0400 Subject: [Rxtx] RXTX Development In-Reply-To: References: Message-ID: What I am working with involves connecting to virtual serial port driver ( http://tibbo.com/downloads/soi/vspdl.html). I have 2 issues: (1) SerialPort.getInputStream().available() returns negative numbers or vary large numbers and cannot be used reliable. I have looked at the C code and see that the value is coming from ioctl. I have a few workarounds. (2) The SerialEvent DATA_AV